<?php
session_start();
if($_SESSION["memberId"] == null || $_SESSION["memberId"] == "")
{
	header("Location:../login.php");
}
?>
<?php include("../Service/WebClass/member/AccountEditClass.php");
$accountEdit = new AccountEdit;
$accountEdit->mytask(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>アカウント編集画面</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script language="JavaScript" src="../js/common.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script type="text/javascript">
<!--

function Secession(){
	document.getElementById('act').value ='Secession';
	document.getElementById('inputform').submit();
}

-->
</script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#F4FFE4">
<?php include("../head.php") ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">

 <tr>
    <td width="165" valign="top" bgcolor="#5C743D"><?php include("../menu.php");?></td>
    <td width="813" colspan="2" align="center" valign="top">
    <br />
    <form name="inputform" id="inputform" method="post">
    <input type="hidden" name="act" id="act" value="submit"/>
    <?php
    if($accountEdit->errorMessage != null && $accountEdit->errorMessage != "")
		echo "<font id=errorMsg name=errorMsg color=red>".$accountEdit->errorMessage."</font>";
    ?>    
    <table class="tbl" width="80%" border="0" cellpadding="4" cellspacing="0">
      <tbody><tr>
			<td class="td9" width="126" align="left"><span class="subHeader">ユーザー名</span></td>
			<td width="334" class="td4 left"><span id="sprytextfield2">				
			<?php echo $accountEdit->loginid;?></td>
		</tr>

		<tr>
			<td class="td9 top"><span class="subHeader">パスワード</span></td>
			<td class="td4 border"><span id="sprytextfield3">
				<input name="password" size="20" maxlength="20" class="txBox" type="password" value=<?php echo $accountEdit->password;?> ></input>
				<span class="textfieldRequiredMsg">パスワードを入力してください</span></span>				&nbsp;&nbsp;&nbsp;&nbsp;
			    <input class="btn btn_widest" value="パスワードサンプル" onclick="this.form.password_sample.value = makePassword(8);this.form.password_sample.style.display='';" type="button" />
		      <input name="password_sample" size="15" value="" class="txBox" style="display: none;" readonly="readonly" type="text">			</td>
		</tr>
		<tr>
			<td class="td9 top"><span class="subHeader">パスワード(確認用)</span></td>
			<td class="td4 border"><span id="sprytextfield4">
			  <input name="confirm_password" size="20" maxlength="20" class="txBox" type="password" value=<?php echo $accountEdit->passwordConfirm;?> ></input>
			  <span class="textfieldRequiredMsg">パスワード(確認用)を入力してください。</span></span></td>
		</tr>
        <tr>
			<td class="td9 top"><span class="subHeader">会社名</span></td>
			<td class="td4 border"><span id="sprytextfield5">
			  <input name="company" size="60" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->company;?> ></input>
			  <span class="textfieldRequiredMsg">会社名を入力してください。</span></span></td>
		</tr>
                <tr>
			<td class="td9 top"><span class="subHeader">役職名</span></td>
			<td class="td4 border">
			  <input name="post" size="30" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->post;?> ></input>			 </td>
		</tr>
                <tr>
			<td class="td9 top"><span class="subHeader">担当者名</span></td>
			<td class="td4 border"><span id="sprytextfield7">
			  <input name="name" size="30" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->name;?> ></input>
			  <span class="textfieldRequiredMsg">担当者名を入力してください。</span></span></td>
		</tr>
                <tr>
			<td class="td9 top"><span class="subHeader">電話番号</span></td>
			<td class="td4 border"><span id="sprytextfield8">
            <input name="telephone" size="30" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->telephone;?> ></input>
            <span class="textfieldRequiredMsg">電話番号を入力してください。</span></span></td>
		</tr>
                <tr>
			<td class="td9 top"><span class="subHeader">メールアドレス</span></td>
			<td class="td4 border"><span id="sprytextfieldmail">
            <label>
            <input name="email" type="text" class="txBox" id="email" size="30" maxlength="100" value=<?php echo $accountEdit->email;?> ></input>
            </label>
            <span class="textfieldRequiredMsg">メールアドレスを入力してください。</span><span class="textfieldInvalidFormatMsg">入力のフォーマットは不正</span></span></td>
		</tr>
                <tr>
			<td class="td9 top"><span class="subHeader">運営者</span></td>
			<td class="td4 border">
				<select name="management" id="management">
			  <option value="2">代理店</option>
			  <option value="3">登録企業</option>
			  </select>
				<script>
					document.getElementById("management").value = <?php echo $accountEdit->management; ?>;
				</script>		  		  </td>
		</tr>
        <tr>
			<td class="td9 top"><span class="subHeader">会社規模</span></td>
			<td class="td4 border">
                <select name="scaleId" id="scaleId">
                <?php echo $accountEdit->scaleIdValueList;?>
              	</select>
                <script>
				document.getElementById("scaleId").value = <?php echo $accountEdit->scaleId; ?>;
				</script>
            </td>
		</tr>
          <tr>
			<td class="td9 top"><span class="subHeader">業種</span></td>
			<td class="td4 border"><select name="industryId" id="industryId">
			<?php echo $accountEdit->industryIdValueList;?>
			  </select>
 				<script>
				document.getElementById("industryId").value = <?php echo $accountEdit->industryId; ?>;
				</script>			</td>
		</tr>
          <tr>
			<td class="td9 top"><span class="subHeader">住所</span></td>
			<td class="td4 border">
			  <input name="address" size="60" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->address; ?> ></input></td>
		</tr>
          <tr>
			<td class="td9 top"><span class="subHeader">部署</span></td>
			<td class="td4 border">
			  <input name="section" size="60" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->section; ?> ></input></td>
		</tr>
          <tr>
			<td class="td9 top"><span class="subHeader">fax番号</span></td>
			<td class="td4 border">
            <input name="fax" size="30" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->fax; ?> ></input>            </td>
		</tr>
          <tr>
			<td class="td9 top"><span class="subHeader">郵便番号</span></td>
			<td class="td4 border">
            <input name="postalCode" size="30" maxlength="100" class="txBox" type="text" value=<?php echo $accountEdit->postalCode; ?> ></input>            </td>
		</tr>
          <tr>
            <td height="34" class="td9 top"><span class="subHeader">リスティング成績分析</span></td>
            <td class="td4 border"></input>
              <input name="joinRanking" type="radio" id="joinRanking" value="1" <?php if($accountEdit->joinRanking == 1) { ?>checked="checked" <?php } ?>/>参加
			  <input name="joinRanking" type="radio"  id="joinRanking2" value="0" <?php if($accountEdit->joinRanking == 0) { ?>checked="checked" <?php } ?>/>不参加
             </td>
          </tr>
        <tr>
          <td class="td4 border"　align="center" colspan="2"><div align="center">
            <input type="submit" class="navText" value="保存"/>
            <INPUT TYPE="button" class="navText" VALUE="退会" ID="Leave" onclick="if (!confirm('本当に退会しますか？') ) return; Secession();" />
          </div></td>
        </tr>
	</tbody>
    </table>
    </form>
    <br />    </td>
  </tr>
</table>
<?php include("../foot.php");?>
</body>
</html>